package com.onpositive.wikidataeditor;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import com.onpositive.mediawiki.propertyparser.PropertyGroup;

public class PropertyPerspective implements IPerspectiveFactory {

	/**
	 * The ID of the perspective as specified in the extension.
	 */
	public static final String ID = "com.onpositive.wikidataeditor.propertyPerspective";

	public void createInitialLayout(IPageLayout layout)
	{
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
		layout.addStandaloneView(PropertyGroupsListView.ID,  false, IPageLayout.LEFT, 0.15f, editorArea);
		layout.addStandaloneView(PropertiesListView.ID,  false, IPageLayout.LEFT, 0.25f, editorArea);
		layout.addView( PropertyDetailsView.ID,  IPageLayout.BOTTOM, 0.7f, editorArea );
		IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
		folder.addPlaceholder(PropertyValuesView.ID + ":*");
		folder.addView(PropertyValuesView.ID);
		
		
		layout.getViewLayout(PropertiesListView.ID).setCloseable(false);
	}
}
